home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / chain11.zip / CHAIN11.DOC < prev   
Text File  |  1992-08-26  |  5KB  |  120 lines

  1. CHAIN v1.0
  2.  
  3. Description:
  4.      This program generates a user definable chain as a declared object
  5.     (indivdual link) or a composite (whole chain).  It also generates a
  6.     scene to display the chain in.  While the POV files are being
  7.     generated, a line drawing of a link is drawn to show what it looks like
  8.     without having to render one.  For POVRay 1.0 (p.k.a. DKB) Ray-Tracing
  9.     program.
  10.  
  11. Suggested Input:
  12.      Link Inside Diameter      : .25 The measurement of the inside width
  13.                     of a link. The inside hieght is fixed
  14.                     at 0.5 for easy connection of links.
  15.                     A diagram further down in this text
  16.                     shows the measurement.
  17.      Metal Radius          : .1    The radius of the wire used to make
  18.                     the link.
  19.      Structure (Straight/Arc) :    Build linear or circular chain.
  20. Strt->     Number of Links      : 3    "1" link will create just an object.
  21.                     More links will also create a composite
  22.                     which contains multiple links.
  23. Arc->     Arc Method (Links/Radius):    Specify as number of links and the
  24.                     program figures out how large to make
  25.                     the cirular chain -or- specify how
  26.                     large circular chain is and the program
  27.                     figures out how many links are needed.
  28. Arc->    Number of Links/360 deg. : 8    How many 1 unit links make up the
  29.  or                    circular chain.
  30. Arc->    Arc Radius         : 1.2    How large is the circular chain.
  31.  
  32.  
  33.  
  34.  
  35.                        ---
  36.                     /  ___  \
  37.                   /  /       \  \
  38.                 /  /         \    \
  39.                    |  |          |  |
  40.                    |  |          |  |
  41.                    |  |    LinkID|  |
  42.                    |  |    +-----+  |
  43.                    |  |          |  |
  44.                    |  |          |  |
  45.                    |  |          |  |
  46.                 \  \         /    /
  47.                   \  \-----/  /
  48.                     \_______/
  49.  
  50.  
  51. Output Files:
  52.  
  53.      CHAIN.INC    - An include file defining the chain and its texture.
  54.           To change the attributes of the object across all frames,
  55.           simply modify this file.
  56.  
  57.      CHAIN.POV    - A whole scene definition displaying the output CHAIN.
  58.           This includes a fixed view point, light source,
  59.           checkered floor, and the placement of the chain.
  60.  
  61. Application Notes:
  62.  
  63.      As described earlier, the size of a link is determined by the
  64.     inside measurements.  Thats how a chain really works.  It doesn't
  65.     matter how high or thick the links are, just how big the holes are.
  66.     That works out great for us so we can change the thickness of the metal
  67.     without recalculating anything.  The inside hieght is fixed at 0.5.
  68.     Obviously you can scale it silly later.  For placements sake we can say
  69.     that the links origin is at its center and is 1 unit in overall hieght.
  70.     Therefore, 3 links would be at -1, 0, and 1 in the Y.
  71.  
  72.      For more than one link, the origin of the chain is also at its
  73.     center.  In this case, I rotate the odd links 90 degrees (so they fit
  74.     together) and alternate the colour between links.  In the display
  75.     section the chain is twisted a bit to show a nice profile.
  76.  
  77.      Like all of my programs, try whatever values you want and see what
  78.     comes out. LinkID values under 0.5 are OK. LinkID=0.5 just gives you a
  79.     torus. LinkIDs over 0.5 look funky.
  80.  
  81.      NOTE: At this time there appears to be a bug in POVRay. When I
  82.     intersect a torus with a plane (to get a half torus), an infinitely
  83.     thin burr appears at the cut.
  84.  
  85.  
  86. Additional bother:
  87.  
  88.      See also SPRING12 (which generates animated spring scenes), SHADE12
  89.     (which generates pleated lamp shades), DIAMOND (which generates a cut
  90.     gem, plus creates the rest of the .DAT file:  view, light, floor),
  91.     GEAR13 (guess), STAR12 (which generates 3D stars with several
  92.     attributes), FONT2DAT (which converts Grasp/Pictor/compatible fonts to
  93.     objects using many options), and SHP2DKB (which should become SHP2PV)
  94.     which takes AutoCad .SHP font files and generates stroke-type font
  95.     objects.  With all of these programs, just play around with the
  96.     variables to generate new shapes.  For example, generating many long
  97.     points on the star looks like the spokes of a bicycle wheel.  Many
  98.     short points on a large radius star looks like a circular saw blade.
  99.     Use your imagination and please post any ideas or neat works (with
  100.     source) for the world to enjoy.
  101.  
  102.      Trial size soap box:  Please include source when sending programs
  103.     or objects.  Even if its sloppy, it can only help others.  Follow the
  104.     lead of the people who brought us DKB in the first place.  We wouldn't
  105.     have a POVRay now otherwise!  Many thanks to those who do post!
  106.  
  107.     I can be reached at YOU CAN CALL ME RAY RBBS (708) 358-5611.   Now 9600!
  108.  
  109.  
  110.             "Its my world and you're welcome to it".
  111.  
  112.  
  113.                         Ken Koehler (8-26-92)
  114.                         CIS 72740,1161
  115.  
  116.      Enclosed are three files:
  117.  
  118.         CHAIN11.BAS  Quickbasic source
  119.         CHAIN11.DOC  This file
  120.